<?php
class RegisterAction extends Action{
    public function index(){
       $this->display();
	}

	//生成验证码
	public function verify(){
		import("ORG.Util.Image");
		Image::buildImageVerify();
	}

	//检验验证码
	public function verifyCheck()
	{
		//if (md5($_POST['verify']) != Session::get('verify')){
		//	$this->error('验证码错误');
		//}
	}

	public function confirm(){
		//$this->verifyCheck();
		$User = D('UserBasic');
		$vo = $User->create();
		if($vo){
			$insert = $User->add();
			if($insert){
				$this->success('注册成功');
			}else{
				$this->error('注册失败');
			}
		}else{
			exit($User->getError());
		}

	}
}
?>